'''
一个学校，有3个办公室，现在有8位老师等待工位的分配，请编写程序，完成随机的分配
'''
import random
#定义一个列表用来存储三个办公室
schools = [[], [], []]
print(schools)
teachers = [1, 2, 3, 4, 5, 6, 7, 8]
print(teachers)
for i in teachers:
    index = random.randint(0, 2)
    schools[index].append(i)
print(schools)

